package com.zzc.controller;

import com.zzc.common.JsonResult;
import com.zzc.common.TableResult;
import com.zzc.pojo.Recharge;
import com.zzc.service.RechargeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author zhouzhicheng
 * @version 1.0  2020/12/30
 */
@RestController
@RequestMapping("/sys/recharge")
public class RechargeController {
    @Autowired
    private RechargeService rechargeService;
    @RequestMapping("/table")
    public TableResult getRecharge(Integer page, Integer limit){
        return rechargeService.getRecharge(page, limit);
    }
    @RequestMapping("/add")
    public JsonResult addRecharge(Recharge recharge){
       return rechargeService.addRecharge(recharge);
    }
    @RequestMapping("/del")
    public JsonResult addRecharge(Integer[] ids){
        return rechargeService.delRecharge(ids);
    }
    @RequestMapping("/update")
    public JsonResult updateRecharge(Recharge recharge){
        return rechargeService.updateRecharge(recharge);
    }
}
